package com.richie696.rabbit.order.domain;

import com.richie696.rabbit.order.enums.OrderStatus;

import java.io.Serializable;

/**
 * 订单信息表
 *
 * @author richie696
 * @version 1.0
 */
public class OrderInfo implements Serializable {

    private Long id;
    private Long userId;
    private String orderId;
    private String name;
    private Long productId;
    private Long price;
    private Integer count;
    private Integer status;

    public Long getId() {
        return id;
    }

    public OrderInfo setId(Long id) {
        this.id = id;
        return this;
    }

    public Long getUserId() {
        return userId;
    }

    public OrderInfo setUserId(Long userId) {
        this.userId = userId;
        return this;
    }

    public String getOrderId() {
        return orderId;
    }

    public OrderInfo setOrderId(String orderId) {
        this.orderId = orderId;
        return this;
    }

    public String getName() {
        return name;
    }

    public OrderInfo setName(String name) {
        this.name = name;
        return this;
    }

    public Long getProductId() {
        return productId;
    }

    public OrderInfo setProductId(Long productId) {
        this.productId = productId;
        return this;
    }

    public Long getPrice() {
        return price;
    }

    public OrderInfo setPrice(Long price) {
        this.price = price;
        return this;
    }

    public Integer getCount() {
        return count;
    }

    public OrderInfo setCount(Integer count) {
        this.count = count;
        return this;
    }

    public Integer getStatus() {
        return status;
    }

    public String getStatusLabel() {
        return OrderStatus.valueOf(status).getName();
    }

    public OrderInfo setStatus(Integer status) {
        this.status = status;
        return this;
    }
}
